
<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
  <table align="center">
    <tr valign="baseline">
      <td nowrap align="right">ID_USER:</td>
      <td><?php echo $row_usuarios['ID_USER']; ?></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">USER_NAME:</td>
      <td><input type="text" name="USER_NAME" value="<?php echo $row_usuarios['USER_NAME']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">PASS:</td>
      <td><input type="text" name="PASS" value="<?php echo $row_usuarios['PASS']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">&nbsp;</td>
      <td><input type="submit" value="Actualizar registro"></td>
    </tr>
  </table>
  <input type="hidden" name="MM_update" value="form1">
  <input type="hidden" name="ID_USER" value="<?php echo $row_usuarios['ID_USER']; ?>">
</form>
<p>&nbsp;</p>
<?php require_once('Connections/congress.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
  

  mysql_select_db($database_congress, $congress);
  $Result1 = mysql_query($updateSQL, $congress) or die(mysql_error());
}

mysql_select_db($database_congress, $congress);
$query_usuarios = "SELECT * FROM `user`";
$usuarios = mysql_query($query_usuarios, $congress) or die(mysql_error());
$row_usuarios = mysql_fetch_assoc($usuarios);
$totalRows_usuarios = mysql_num_rows($usuarios);

mysql_free_result($usuarios);
?>
